package com.fwj.common.dao;

import com.fwj.common.entity.Code;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @Author: fwj
 * @Data: 2022/4/25 17:50
 * @Version 1.0
 * @Description:
 */


public interface CodeMapper extends Mapper<Code> {

    @Select(value = "SELECT " +
            "code_id codeId, " +
            "code_name codeName, " +
            "code_value codeValue, " +
            "code_type codeType, " +
            "parent_id parentId, " +
            "code_order codeOrder, " +
            "creator, " +
            "remark, " +
            "create_time createTime, " +
            "update_time updateTime, " +
            "status " +
            "FROM tbl_code " +
            "WHERE code_type = #{type} " +
            "AND status = #{status}" +
            "ORDER BY code_id")
    List<Code> selectAllCodeByType(String type,String status);
}
